package com.telnikoff.colaboration;

public final class Failure <T> extends Result <T>
{
	private final String reason;
	private final Throwable exception;
	
	Failure(String reason)
	{
		this.reason = reason;
		exception = null;
	}
	
	Failure(String reason, Throwable exception)
	{
		this.reason = reason;
		this.exception = exception;
	}
	
	Failure(Throwable exception)
	{
		this.reason = null;
		this.exception = exception;
	}
	
	public String getReason() { return reason; }
	
	public Throwable getException() { return exception; }

}